package com.bringway.p2p.service.impl;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.bringway.p2p.dao.CodeDao;
import com.bringway.p2p.service.CodeService;
import net.sf.json.JSONObject;

@Service
@Transactional
public class CodeServiceImpl implements CodeService {

	@Autowired
	private CodeDao codeDao;

	@Override
	public boolean addMenu(JSONObject parms) {
		return codeDao.addMenu(parms) > 0;
	}
	@Override
	public boolean deleteMenu(JSONObject parms) {
		return codeDao.deleteMenu(parms) > 0;
	}
	@Override
	public boolean updateMenu(JSONObject parms) {
		return codeDao.updateMenu(parms) > 0;
	}

	@Override
	public List<Map<String, Object>> queryMenuListWithOutCheckBox(JSONObject params) {
		return codeDao.queryMenuListWithOutCheckBox(params);
	}
	@Override
	public int getQueryMenuCount(JSONObject params) {
		return codeDao.getQueryMenuCount(params);
	}
	@Override
	public List<Map<String, Object>> queryMenuList(JSONObject params) {
		return codeDao.queryMenuList(params);
	}

}
